<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<link href="<c:url value="/css/style.css"/>" rel="stylesheet">
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>员工信息</title>
    <link rel="stylesheet" href="../../css/style.css">
</head>
<body>
<div class="container">
    <div class="sidebar">
        <h2>员工管理系统</h2>
        <div class="user-info">
            <p>欢迎, ${employee.name}</p>
            <a href="logout">退出登录</a>
        </div>
        <ul class="menu">
            <li class="active"><a href="profile">个人信息</a></li>
            <li><a href="attendance?action=admin&empId=${employee.empId}">考勤记录</a></li>
            <li><a href="#">薪资查询</a></li>
            <li><a href="#">修改密码</a></li>
        </ul>
    </div>
    <div class="main-content">
        <h1>个人信息</h1>

        <div class="profile-section">
            <h2>基本信息</h2>
            <div class="profile-row">
                <div class="profile-field">
                    <label>工号:</label>
                    <span>${employee.empId}</span>
                </div>
                <div class="profile-field">
                    <label>姓名:</label>
                    <span>${employee.name}</span>
                </div>
            </div>
            <div class="profile-row">
                <div class="profile-field">
                    <label>性别:</label>
                    <span>${employee.gender}</span>
                </div>
                <div class="profile-field">
                    <label>年龄:</label>
                    <span>${employee.age}</span>
                </div>
            </div>
            <div class="profile-row">
                <div class="profile-field">
                    <label>电话:</label>
                    <span>${employee.phone}</span>
                </div>
                <div class="profile-field">
                    <label>邮箱:</label>
                    <span>${employee.email}</span>
                </div>
            </div>
            <div class="profile-row">
                <div class="profile-field">
                    <label>部门:</label>
                    <span>${employee.deptName}</span>
                </div>
                <div class="profile-field">
                    <label>职务:</label>
                    <span>${employee.position}</span>
                </div>
            </div>
        </div>

        <div class="profile-section">
            <h2>详细信息</h2>
            <div class="profile-row">
                <div class="profile-field">
                    <label>民族:</label>
                    <span>${employee.nation}</span>
                </div>
                <div class="profile-field">
                    <label>籍贯:</label>
                    <span>${employee.birthplace}</span>
                </div>
            </div>
            <div class="profile-row">
                <div class="profile-field">
                    <label>生日:</label>
                    <span>
                        <c:if test="${not empty employee.birthday}">
                            <fmt:formatDate value="${employee.birthday}" pattern="yyyy-MM-dd" />
                        </c:if>
                    </span>
                </div>
                <div class="profile-field">
                    <label>学历:</label>
                    <span>${employee.education}</span>
                </div>
            </div>
            <div class="profile-row">
                <div class="profile-field">
                    <label>毕业院校:</label>
                    <span>${employee.graduateSchool}</span>
                </div>
                <div class="profile-field">
                    <label>入职日期:</label>
                    <span>
                        <c:if test="${not empty employee.hireDate}">
                            <fmt:formatDate value="${employee.hireDate}" pattern="yyyy-MM-dd" />
                        </c:if>
                    </span>
                </div>
            </div>
            <div class="profile-row">
                <div class="profile-field">
                    <label>在职状态:</label>
                    <span>${employee.status}</span>
                </div>
                <div class="profile-field">
                    <label>合同编号:</label>
                    <span>${employee.contractId}</span>
                </div>
            </div>
            <div class="profile-row">
                <div class="profile-field">
                    <label>转正日期:</label>
                    <span>${employee.regularDate}</span>
                </div>
                <div class="profile-field">
                    <label>离职日期:</label>
                    <span>${employee.leaveDate}</span>
                </div>
            </div>
            <div class="profile-row">
                <div class="profile-field">
                    <label>地址:</label>
                    <span>${employee.address}</span>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>